<!DOCTYPE html><html><head>
      <title>6PHP&#x51FD;&#x6570;</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      
      <link rel="stylesheet" href="file:///C:\Users\Administrator\.vscode\extensions\shd101wyy.markdown-preview-enhanced-0.4.3\node_modules\@shd101wyy\mume\dependencies\katex\katex.min.css">
      
      

      
      
      
      
      
      

      <style>
      /**
 * prism.js Github theme based on GitHub's theme.
 * @author Sam Clarke
 */
code[class*="language-"],
pre[class*="language-"] {
  color: #333;
  background: none;
  font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.4;

  -moz-tab-size: 8;
  -o-tab-size: 8;
  tab-size: 8;

  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
  padding: .8em;
  overflow: auto;
  /* border: 1px solid #ddd; */
  border-radius: 3px;
  /* background: #fff; */
  background: #f5f5f5;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
  padding: .1em;
  border-radius: .3em;
  white-space: normal;
  background: #f5f5f5;
}

.token.comment,
.token.blockquote {
  color: #969896;
}

.token.cdata {
  color: #183691;
}

.token.doctype,
.token.punctuation,
.token.variable,
.token.macro.property {
  color: #333;
}

.token.operator,
.token.important,
.token.keyword,
.token.rule,
.token.builtin {
  color: #a71d5d;
}

.token.string,
.token.url,
.token.regex,
.token.attr-value {
  color: #183691;
}

.token.property,
.token.number,
.token.boolean,
.token.entity,
.token.atrule,
.token.constant,
.token.symbol,
.token.command,
.token.code {
  color: #0086b3;
}

.token.tag,
.token.selector,
.token.prolog {
  color: #63a35c;
}

.token.function,
.token.namespace,
.token.pseudo-element,
.token.class,
.token.class-name,
.token.pseudo-class,
.token.id,
.token.url-reference .token.variable,
.token.attr-name {
  color: #795da3;
}

.token.entity {
  cursor: help;
}

.token.title,
.token.title .token.punctuation {
  font-weight: bold;
  color: #1d3e81;
}

.token.list {
  color: #ed6a43;
}

.token.inserted {
  background-color: #eaffea;
  color: #55a532;
}

.token.deleted {
  background-color: #ffecec;
  color: #bd2c00;
}

.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}


/* JSON */
.language-json .token.property {
  color: #183691;
}

.language-markup .token.tag .token.punctuation {
  color: #333;
}

/* CSS */
code.language-css,
.language-css .token.function {
  color: #0086b3;
}

/* YAML */
.language-yaml .token.atrule {
  color: #63a35c;
}

code.language-yaml {
  color: #183691;
}

/* Ruby */
.language-ruby .token.function {
  color: #333;
}

/* Markdown */
.language-markdown .token.url {
  color: #795da3;
}

/* Makefile */
.language-makefile .token.symbol {
  color: #795da3;
}

.language-makefile .token.variable {
  color: #183691;
}

.language-makefile .token.builtin {
  color: #0086b3;
}

/* Bash */
.language-bash .token.keyword {
  color: #0086b3;
}

/* highlight */
pre[data-line] {
  position: relative;
  padding: 1em 0 1em 3em;
}
pre[data-line] .line-highlight-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  background-color: transparent;
  display: block;
  width: 100%;
}

pre[data-line] .line-highlight {
  position: absolute;
  left: 0;
  right: 0;
  padding: inherit 0;
  margin-top: 1em;
  background: hsla(24, 20%, 50%,.08);
  background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
  pointer-events: none;
  line-height: inherit;
  white-space: pre;
}

pre[data-line] .line-highlight:before, 
pre[data-line] .line-highlight[data-end]:after {
  content: attr(data-start);
  position: absolute;
  top: .4em;
  left: .6em;
  min-width: 1em;
  padding: 0 .5em;
  background-color: hsla(24, 20%, 50%,.4);
  color: hsl(24, 20%, 95%);
  font: bold 65%/1.5 sans-serif;
  text-align: center;
  vertical-align: .3em;
  border-radius: 999px;
  text-shadow: none;
  box-shadow: 0 1px white;
}

pre[data-line] .line-highlight[data-end]:after {
  content: attr(data-end);
  top: auto;
  bottom: .4em;
}html body{font-family:"Helvetica Neue",Helvetica,"Segoe UI",Arial,freesans,sans-serif;font-size:16px;line-height:1.6;color:#333;background-color:#fff;overflow:initial;box-sizing:border-box;word-wrap:break-word}html body>:first-child{margin-top:0}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{line-height:1.2;margin-top:1em;margin-bottom:16px;color:#000}html body h1{font-size:2.25em;font-weight:300;padding-bottom:.3em}html body h2{font-size:1.75em;font-weight:400;padding-bottom:.3em}html body h3{font-size:1.5em;font-weight:500}html body h4{font-size:1.25em;font-weight:600}html body h5{font-size:1.1em;font-weight:600}html body h6{font-size:1em;font-weight:600}html body h1,html body h2,html body h3,html body h4,html body h5{font-weight:600}html body h5{font-size:1em}html body h6{color:#5c5c5c}html body strong{color:#000}html body del{color:#5c5c5c}html body a:not([href]){color:inherit;text-decoration:none}html body a{color:#08c;text-decoration:none}html body a:hover{color:#00a3f5;text-decoration:none}html body img{max-width:100%}html body>p{margin-top:0;margin-bottom:16px;word-wrap:break-word}html body>ul,html body>ol{margin-bottom:16px}html body ul,html body ol{padding-left:2em}html body ul.no-list,html body ol.no-list{padding:0;list-style-type:none}html body ul ul,html body ul ol,html body ol ol,html body ol ul{margin-top:0;margin-bottom:0}html body li{margin-bottom:0}html body li.task-list-item{list-style:none}html body li>p{margin-top:0;margin-bottom:0}html body .task-list-item-checkbox{margin:0 .2em .25em -1.8em;vertical-align:middle}html body .task-list-item-checkbox:hover{cursor:pointer}html body blockquote{margin:16px 0;font-size:inherit;padding:0 15px;color:#5c5c5c;border-left:4px solid #d6d6d6}html body blockquote>:first-child{margin-top:0}html body blockquote>:last-child{margin-bottom:0}html body hr{height:4px;margin:32px 0;background-color:#d6d6d6;border:0 none}html body table{margin:10px 0 15px 0;border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}html body table th{font-weight:bold;color:#000}html body table td,html body table th{border:1px solid #d6d6d6;padding:6px 13px}html body dl{padding:0}html body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:bold}html body dl dd{padding:0 16px;margin-bottom:16px}html body code{font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:.85em !important;color:#000;background-color:#f0f0f0;border-radius:3px;padding:.2em 0}html body code::before,html body code::after{letter-spacing:-0.2em;content:"\00a0"}html body pre>code{padding:0;margin:0;font-size:.85em !important;word-break:normal;white-space:pre;background:transparent;border:0}html body .highlight{margin-bottom:16px}html body .highlight pre,html body pre{padding:1em;overflow:auto;font-size:.85em !important;line-height:1.45;border:#d6d6d6;border-radius:3px}html body .highlight pre{margin-bottom:0;word-break:normal}html body pre code,html body pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}html body pre code:before,html body pre tt:before,html body pre code:after,html body pre tt:after{content:normal}html body p,html body blockquote,html body ul,html body ol,html body dl,html body pre{margin-top:0;margin-bottom:16px}html body kbd{color:#000;border:1px solid #d6d6d6;border-bottom:2px solid #c7c7c7;padding:2px 4px;background-color:#f0f0f0;border-radius:3px}@media print{html body{background-color:#fff}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{color:#000;page-break-after:avoid}html body blockquote{color:#5c5c5c}html body pre{page-break-inside:avoid}html body table{display:table}html body img{display:block;max-width:100%;max-height:100%}html body pre,html body code{word-wrap:break-word;white-space:pre}}.markdown-preview{width:100%;height:100%;box-sizing:border-box}.markdown-preview .pagebreak,.markdown-preview .newpage{page-break-before:always}.markdown-preview pre.line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}.markdown-preview pre.line-numbers>code{position:relative}.markdown-preview pre.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:1em;font-size:100%;left:0;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-preview pre.line-numbers .line-numbers-rows>span{pointer-events:none;display:block;counter-increment:linenumber}.markdown-preview pre.line-numbers .line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}.markdown-preview .mathjax-exps .MathJax_Display{text-align:center !important}.markdown-preview:not([for="preview"]) .code-chunk .btn-group{display:none}.markdown-preview:not([for="preview"]) .code-chunk .status{display:none}.markdown-preview:not([for="preview"]) .code-chunk .output-div{margin-bottom:16px}.scrollbar-style::-webkit-scrollbar{width:8px}.scrollbar-style::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}.scrollbar-style::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,0.66);border:4px solid rgba(150,150,150,0.66);background-clip:content-box}html body[for="html-export"]:not([data-presentation-mode]){position:relative;width:100%;height:100%;top:0;left:0;margin:0;padding:0;overflow:auto}html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{position:relative;top:0}@media screen and (min-width:914px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{padding:2em calc(50% - 457px + 2em)}}@media screen and (max-width:914px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{font-size:14px !important;padding:1em}}@media print{html body[for="html-export"]:not([data-presentation-mode]) #sidebar-toc-btn{display:none}}html body[for="html-export"]:not([data-presentation-mode]) #sidebar-toc-btn{position:fixed;bottom:8px;left:8px;font-size:28px;cursor:pointer;color:inherit;z-index:99;width:32px;text-align:center;opacity:.4}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] #sidebar-toc-btn{opacity:1}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc{position:fixed;top:0;left:0;width:300px;height:100%;padding:32px 0 48px 0;font-size:14px;box-shadow:0 0 4px rgba(150,150,150,0.33);box-sizing:border-box;overflow:auto;background-color:inherit}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar{width:8px}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,0.66);border:4px solid rgba(150,150,150,0.66);background-clip:content-box}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc a{text-decoration:none}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc ul{padding:0 1.6em;margin-top:.8em}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc li{margin-bottom:.8em}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc ul{list-style-type:none}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{left:300px;width:calc(100% -  300px);padding:2em calc(50% - 457px -  150px);margin:0;box-sizing:border-box}@media screen and (max-width:1274px){html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{width:100%}}html body[for="html-export"]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .markdown-preview{left:50%;transform:translateX(-50%)}html body[for="html-export"]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .md-sidebar-toc{display:none}
/* Please visit the URL below for more information: */
/*   https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css */

      </style>
    </head>
    <body for="html-export">
      <div class="mume markdown-preview  ">
      <h1 class="mume-header" id="php%E5%87%BD%E6%95%B0">PHP&#x51FD;&#x6570;</h1>

<ul>
<li><a href="#php%E5%87%BD%E6%95%B0">PHP&#x51FD;&#x6570;</a></li>
<li><a href="#-%E7%B3%BB%E7%BB%9F%E5%87%BD%E6%95%B0">:-: &#x7CFB;&#x7EDF;&#x51FD;&#x6570;</a>
<ul>
<li><a href="#%E4%B8%80-%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%87%BD%E6%95%B0">&#x4E00;&#x3001;&#x5B57;&#x7B26;&#x4E32;&#x51FD;&#x6570;</a>
<ul>
<li><a href="#1-strtolower">1&#x3001;<code>strtolower()</code></a></li>
<li><a href="#2-strtoupper">2&#x3001;<code>strtoupper()</code></a></li>
<li><a href="#3-strlen">3&#x3001;<code>strlen()</code></a></li>
<li><a href="#4-trim-ltrim-rtrim">4&#x3001;<code>trim()</code> <code>ltrim()</code> <code>rtrim()</code></a></li>
<li><a href="#5-str_replace">5&#x3001;<code>str_replace()</code></a></li>
<li><a href="#6-strpbrk">6&#x3001;<code>strpbrk()</code></a></li>
<li><a href="#7-explode">7&#x3001;<code>explode()</code></a></li>
<li><a href="#8-implode">8&#x3001;<code>implode()</code></a></li>
<li><a href="#9-md5">9&#x3001;<code>md5()</code></a></li>
</ul>
</li>
<li><a href="#%E4%BA%8C-%E6%95%B0%E7%BB%84%E5%87%BD%E6%95%B0">&#x4E8C;&#x3001;&#x6570;&#x7EC4;&#x51FD;&#x6570;</a>
<ul>
<li><a href="#1-count">1&#x3001;<code>count()</code></a></li>
<li><a href="#2-array_merge">2&#x3001;<code>array_merge()</code></a></li>
<li><a href="#3-in_array">3&#x3001;<code>in_array()</code></a></li>
<li><a href="#4-sort">4&#x3001;<code>sort()</code></a></li>
<li><a href="#5-array_unique">5&#x3001;<code>array_unique()</code></a></li>
<li><a href="#6-array_push">6&#x3001;<code>array_push()</code></a></li>
<li><a href="#7-array_pop">7&#x3001;<code>array_pop()</code></a></li>
</ul>
</li>
<li><a href="#%E4%B8%89-%E5%87%BD%E6%95%B0%E5%88%86%E7%B1%BB">&#x4E09;&#x3001;&#x51FD;&#x6570;&#x5206;&#x7C7B;</a></li>
</ul>
</li>
<li><a href="#-%E8%87%AA%E5%AE%9A%E4%B9%89%E6%96%B9%E6%B3%95-%E8%87%AA%E5%AE%9A%E4%B9%89%E5%87%BD%E6%95%B0">:-: &#x81EA;&#x5B9A;&#x4E49;&#x65B9;&#x6CD5; (&#x81EA;&#x5B9A;&#x4E49;&#x51FD;&#x6570;)</a>
<ul>
<li><a href="#%E4%B8%80-%E6%96%B9%E6%B3%95%E4%BD%BF%E7%94%A8">&#x4E00;&#x3001;&#x65B9;&#x6CD5;&#x4F7F;&#x7528;</a>
<ul>
<li><a href="#1-%E6%96%B9%E6%B3%95%E5%A3%B0%E6%98%8E-function">1&#x3001;&#x65B9;&#x6CD5;&#x58F0;&#x660E; <code>function</code></a></li>
<li><a href="#2-%E6%96%B9%E6%B3%95%E8%B0%83%E7%94%A8">2&#x3001;&#x65B9;&#x6CD5;&#x8C03;&#x7528;</a></li>
<li><a href="#3-%E6%96%B9%E6%B3%95%E5%8F%82%E6%95%B0">3&#x3001;&#x65B9;&#x6CD5;&#x53C2;&#x6570;</a></li>
<li><a href="#4-%E6%96%B9%E6%B3%95%E8%BF%94%E5%9B%9E%E5%80%BC-return">4&#x3001;&#x65B9;&#x6CD5;&#x8FD4;&#x56DE;&#x503C; <code>return</code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
<hr>
<ul>
<li>PHP&#x51FD;&#x6570;&#x5C31;&#x662F;&#x6709;&#x4E00;&#x5B9A;&#x529F;&#x80FD;&#x7684;&#x4E00;&#x4E9B;&#x8BED;&#x53E5;&#x7EC4;&#x7EC7;&#x5728;&#x4E00;&#x8D77;&#x7684;&#x4E00;&#x79CD;&#x5F62;&#x5F0F;&#x3002;</li>
<li>PHP &#x7684;&#x771F;&#x6B63;&#x529B;&#x91CF;&#x6765;&#x81EA;&#x5B83;&#x7684;&#x51FD;&#x6570;&#xFF1A;&#x5B83;&#x62E5;&#x6709;&#x8D85;&#x8FC7; 1000 &#x4E2A;&#x5185;&#x5EFA;&#x7684;&#x51FD;&#x6570;&#x3002;</li>
</ul>
<h1 class="mume-header" id="-%E7%B3%BB%E7%BB%9F%E5%87%BD%E6%95%B0">:-: &#x7CFB;&#x7EDF;&#x51FD;&#x6570;</h1>

<h3 class="mume-header" id="%E4%B8%80-%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%87%BD%E6%95%B0">&#x4E00;&#x3001;&#x5B57;&#x7B26;&#x4E32;&#x51FD;&#x6570;</h3>

<table>
<thead>
<tr>
<th><strong>&#x51FD;&#x6570;</strong></th>
<th><strong>&#x63CF;&#x8FF0;</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td><code>strtolower()</code></td>
<td>&#x5C06;&#x5B57;&#x7B26;&#x4E32;&#x8F6C;&#x5316;&#x4E3A;&#x5C0F;&#x5199;</td>
</tr>
<tr>
<td><code>strtoupper</code></td>
<td>&#x5C06;&#x5B57;&#x7B26;&#x4E32;&#x8F6C;&#x5316;&#x4E3A;&#x5927;&#x5199;</td>
</tr>
<tr>
<td><code>strlen()</code></td>
<td>&#x83B7;&#x53D6;&#x5B57;&#x7B26;&#x4E32;&#x957F;&#x5EA6;</td>
</tr>
<tr>
<td><code>trim()</code></td>
<td>&#x53BB;&#x9664;&#x5B57;&#x7B26;&#x4E32;&#x9996;&#x5C3E;&#x5904;&#x7684;&#x7A7A;&#x767D;&#x5B57;&#x7B26;&#xFF08;&#x6216;&#x8005;&#x5176;&#x4ED6;&#x5B57;&#x7B26;&#xFF09;</td>
</tr>
<tr>
<td><code>ltrim()</code></td>
<td>&#x53BB;&#x9664;&#x5B57;&#x7B26;&#x4E32;&#x5F00;&#x5934;&#x7684;&#x7A7A;&#x767D;&#x5B57;&#x7B26;</td>
</tr>
<tr>
<td><code>rtrim()</code></td>
<td>&#x53BB;&#x9664;&#x5B57;&#x7B26;&#x4E32;&#x7ED3;&#x5C3E;&#x7684;&#x7A7A;&#x767D;&#x5B57;&#x7B26;</td>
</tr>
<tr>
<td><code>str_replace()</code></td>
<td>&#x5B57;&#x7B26;&#x4E32;&#x66FF;&#x6362;</td>
</tr>
<tr>
<td><code>strpbrk()</code></td>
<td>&#x5B57;&#x7B26;&#x4E32;&#x4E2D;&#x67E5;&#x627E;&#x4E00;&#x7EC4;&#x5B57;&#x7B26;&#x662F;&#x5426;&#x5B58;&#x5728;</td>
</tr>
<tr>
<td><code>explode()</code></td>
<td>&#x5C06;&#x5B57;&#x7B26;&#x4E32;&#x5206;&#x5272;&#x4E3A;&#x6570;&#x7EC4;</td>
</tr>
<tr>
<td><code>implode()</code></td>
<td>&#x628A;&#x6570;&#x7EC4;&#x5143;&#x7D20;&#x7EC4;&#x5408;&#x4E3A;&#x5B57;&#x7B26;&#x4E32;</td>
</tr>
<tr>
<td><code>md5()</code></td>
<td>&#x5C06;&#x5B57;&#x7B26;&#x4E32;&#x8FDB;&#x884C;md5&#x52A0;&#x5BC6;</td>
</tr>
</tbody>
</table>
<h4 class="mume-header" id="1-strtolower">1&#x3001;<code>strtolower()</code></h4>

<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token variable">$str</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;OUYANGKE&apos;</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">strtolower</span><span class="token punctuation">(</span><span class="token variable">$str</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token single-quoted-string string">&apos;&lt;hr&gt;&apos;</span><span class="token punctuation">;</span>
<span class="token variable">$str</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;HuangRong&apos;</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">strtolower</span><span class="token punctuation">(</span><span class="token variable">$str</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><h4 class="mume-header" id="2-strtoupper">2&#x3001;<code>strtoupper()</code></h4>

<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token variable">$str</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;ouyangke&apos;</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">strtoupper</span><span class="token punctuation">(</span><span class="token variable">$str</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token single-quoted-string string">&apos;&lt;hr&gt;&apos;</span><span class="token punctuation">;</span>
<span class="token variable">$str</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;HuangRong&apos;</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">strtoupper</span><span class="token punctuation">(</span><span class="token variable">$str</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><h4 class="mume-header" id="3-strlen">3&#x3001;<code>strlen()</code></h4>

<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token variable">$str</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;ouyangke&apos;</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">strlen</span><span class="token punctuation">(</span><span class="token variable">$str</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token single-quoted-string string">&apos;&lt;hr&gt;&apos;</span><span class="token punctuation">;</span>
<span class="token variable">$str</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;HuangRong&apos;</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">strlen</span><span class="token punctuation">(</span><span class="token variable">$str</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><h4 class="mume-header" id="4-trim-ltrim-rtrim">4&#x3001;<code>trim()</code> <code>ltrim()</code> <code>rtrim()</code></h4>

<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token variable">$str</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos; ouyangke &apos;</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">trim</span><span class="token punctuation">(</span><span class="token variable">$str</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token single-quoted-string string">&apos;&lt;hr&gt;&apos;</span><span class="token punctuation">;</span>
<span class="token variable">$str</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos; HuangRong &apos;</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">lrim</span><span class="token punctuation">(</span><span class="token variable">$str</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token single-quoted-string string">&apos;&lt;hr&gt;&apos;</span><span class="token punctuation">;</span>
<span class="token variable">$str</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos; guojing &apos;</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">rrim</span><span class="token punctuation">(</span><span class="token variable">$str</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><h4 class="mume-header" id="5-str_replace">5&#x3001;<code>str_replace()</code></h4>

<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token variable">$str</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;ouyangke huangrong guojing&apos;</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">str_replace</span><span class="token punctuation">(</span><span class="token single-quoted-string string">&apos;ouyangke&apos;</span><span class="token punctuation">,</span><span class="token single-quoted-string string">&apos;&#x6B27;&#x9633;&#x514B;&apos;</span><span class="token punctuation">,</span><span class="token variable">$str</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><h4 class="mume-header" id="6-strpbrk">6&#x3001;<code>strpbrk()</code></h4>

<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token variable">$str</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;ouyangke huangrong guojing&apos;</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">str_replace</span><span class="token punctuation">(</span><span class="token variable">$str</span><span class="token punctuation">,</span><span class="token single-quoted-string string">&apos;huang&apos;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><h4 class="mume-header" id="7-explode">7&#x3001;<code>explode()</code></h4>

<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token variable">$str</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;ouyangke huangrong guojing&apos;</span><span class="token punctuation">;</span>
<span class="token variable">$arr</span> <span class="token operator">=</span> <span class="token function">explode</span><span class="token punctuation">(</span><span class="token single-quoted-string string">&apos; &apos;</span><span class="token punctuation">,</span><span class="token variable">$str</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><h4 class="mume-header" id="8-implode">8&#x3001;<code>implode()</code></h4>

<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token variable">$arr</span> <span class="token operator">=</span> <span class="token keyword">array</span><span class="token punctuation">(</span>
    <span class="token single-quoted-string string">&apos;&#x6B27;&#x9633;&#x514B;&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;&#x9EC4;&#x84C9;&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;&#x90ED;&#x9756;&apos;</span>
<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">implode</span><span class="token punctuation">(</span><span class="token single-quoted-string string">&apos;,&apos;</span><span class="token punctuation">,</span><span class="token variable">$arr</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><h4 class="mume-header" id="9-md5">9&#x3001;<code>md5()</code></h4>

<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token variable">$str</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;ouyangke&apos;</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">md5</span><span class="token punctuation">(</span><span class="token variable">$str</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><hr>
<h3 class="mume-header" id="%E4%BA%8C-%E6%95%B0%E7%BB%84%E5%87%BD%E6%95%B0">&#x4E8C;&#x3001;&#x6570;&#x7EC4;&#x51FD;&#x6570;</h3>

<table>
<thead>
<tr>
<th><strong>&#x51FD;&#x6570;</strong></th>
<th><strong>&#x63CF;&#x8FF0;</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td><code>count()</code></td>
<td>&#x6570;&#x7EC4;&#x4E2D;&#x5143;&#x7D20;&#x7684;&#x6570;&#x91CF;</td>
</tr>
<tr>
<td><code>array_merge()</code></td>
<td>&#x4E24;&#x4E2A;&#x6570;&#x7EC4;&#x5408;&#x5E76;&#x4E3A;&#x4E00;&#x4E2A;&#x6570;&#x7EC4;</td>
</tr>
<tr>
<td><code>in_array()</code></td>
<td>&#x6570;&#x7EC4;&#x4E2D;&#x662F;&#x5426;&#x5B58;&#x5728;&#x6307;&#x5B9A;&#x7684;&#x503C;</td>
</tr>
<tr>
<td><code>sort()</code></td>
<td>&#x5BF9;&#x6570;&#x503C;&#x6570;&#x7EC4;&#x8FDB;&#x884C;&#x5347;&#x5E8F;&#x6392;&#x5E8F;</td>
</tr>
<tr>
<td><code>rsort()</code></td>
<td>&#x5BF9;&#x6570;&#x503C;&#x6570;&#x7EC4;&#x8FDB;&#x884C;&#x964D;&#x5E8F;&#x6392;&#x5E8F;</td>
</tr>
<tr>
<td><code>array_unique()</code></td>
<td>&#x79FB;&#x9664;&#x6570;&#x7EC4;&#x4E2D;&#x7684;&#x91CD;&#x590D;&#x7684;&#x503C;</td>
</tr>
<tr>
<td><code>array_push()</code></td>
<td>&#x5C06;&#x4E00;&#x4E2A;&#x6216;&#x591A;&#x4E2A;&#x5143;&#x7D20;&#x63D2;&#x5165;&#x6570;&#x7EC4;&#x7684;&#x672B;&#x5C3E;</td>
</tr>
<tr>
<td><code>array_pop()</code></td>
<td>&#x5220;&#x9664;&#x6570;&#x7EC4;&#x4E2D;&#x7684;&#x6700;&#x540E;&#x4E00;&#x4E2A;&#x5143;&#x7D20;</td>
</tr>
</tbody>
</table>
<h4 class="mume-header" id="1-count">1&#x3001;<code>count()</code></h4>

<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token variable">$arr</span> <span class="token operator">=</span> <span class="token keyword">array</span><span class="token punctuation">(</span>
    <span class="token single-quoted-string string">&apos;&#x6B27;&#x9633;&#x514B;&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;&#x9EC4;&#x84C9;&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;&#x90ED;&#x9756;&apos;</span>
<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">count</span><span class="token punctuation">(</span><span class="token variable">$arr</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><h4 class="mume-header" id="2-array_merge">2&#x3001;<code>array_merge()</code></h4>

<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token variable">$arr1</span> <span class="token operator">=</span> <span class="token keyword">array</span><span class="token punctuation">(</span>
    <span class="token single-quoted-string string">&apos;&#x6B27;&#x9633;&#x514B;&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;&#x9EC4;&#x84C9;&apos;</span>
<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token variable">$arr2</span> <span class="token operator">=</span> <span class="token keyword">array</span><span class="token punctuation">(</span>
    <span class="token single-quoted-string string">&apos;&#x90ED;&#x9756;&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;&#x6768;&#x5EB7;&apos;</span>
<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token variable">$arr3</span> <span class="token operator">=</span> <span class="token function">array_merge</span><span class="token punctuation">(</span><span class="token variable">$arr1</span><span class="token punctuation">,</span><span class="token variable">$arr2</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">print_r</span><span class="token punctuation">(</span><span class="token variable">$arr3</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><h4 class="mume-header" id="3-in_array">3&#x3001;<code>in_array()</code></h4>

<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token variable">$arr</span> <span class="token operator">=</span> <span class="token keyword">array</span><span class="token punctuation">(</span>
    <span class="token single-quoted-string string">&apos;&#x6B27;&#x9633;&#x514B;&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;&#x9EC4;&#x84C9;&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;&#x90ED;&#x9756;&apos;</span>
<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">in_array</span><span class="token punctuation">(</span><span class="token single-quoted-string string">&apos;&#x6B27;&#x9633;&#x514B;&apos;</span><span class="token punctuation">,</span><span class="token variable">$arr</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><h4 class="mume-header" id="4-sort">4&#x3001;<code>sort()</code></h4>

<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token variable">$arr</span> <span class="token operator">=</span> <span class="token keyword">array</span><span class="token punctuation">(</span>
    <span class="token single-quoted-string string">&apos;ouyangke&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;huangrong&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;guojing&apos;</span>
<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">sort</span><span class="token punctuation">(</span><span class="token variable">$arr</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">print_r</span><span class="token punctuation">(</span><span class="token variable">$arr</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><h4 class="mume-header" id="5-array_unique">5&#x3001;<code>array_unique()</code></h4>

<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token variable">$arr</span> <span class="token operator">=</span> <span class="token keyword">array</span><span class="token punctuation">(</span>
    <span class="token single-quoted-string string">&apos;&#x6B27;&#x9633;&#x514B;&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;&#x6B27;&#x9633;&#x514B;&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;&#x9EC4;&#x84C9;&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;&#x9EC4;&#x84C9;&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;&#x90ED;&#x9756;&apos;</span>
<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token variable">$arr</span> <span class="token operator">=</span> <span class="token function">array_unique</span><span class="token punctuation">(</span><span class="token variable">$arr</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">print_r</span><span class="token punctuation">(</span><span class="token variable">$arr</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><h4 class="mume-header" id="6-array_push">6&#x3001;<code>array_push()</code></h4>

<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token variable">$arr</span> <span class="token operator">=</span> <span class="token keyword">array</span><span class="token punctuation">(</span>
    <span class="token single-quoted-string string">&apos;&#x6B27;&#x9633;&#x514B;&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;&#x9EC4;&#x84C9;&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;&#x90ED;&#x9756;&apos;</span>
<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">array_push</span><span class="token punctuation">(</span><span class="token variable">$arr</span><span class="token punctuation">,</span><span class="token single-quoted-string string">&apos;&#x6768;&#x5EB7;&apos;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">print_r</span><span class="token punctuation">(</span><span class="token variable">$arr</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><h4 class="mume-header" id="7-array_pop">7&#x3001;<code>array_pop()</code></h4>

<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token variable">$arr</span> <span class="token operator">=</span> <span class="token keyword">array</span><span class="token punctuation">(</span>
    <span class="token single-quoted-string string">&apos;&#x6B27;&#x9633;&#x514B;&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;&#x9EC4;&#x84C9;&apos;</span><span class="token punctuation">,</span>
    <span class="token single-quoted-string string">&apos;&#x90ED;&#x9756;&apos;</span>
<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">array_pop</span><span class="token punctuation">(</span><span class="token variable">$arr</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">print_r</span><span class="token punctuation">(</span><span class="token variable">$arr</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><hr>
<h3 class="mume-header" id="%E4%B8%89-%E5%87%BD%E6%95%B0%E5%88%86%E7%B1%BB">&#x4E09;&#x3001;&#x51FD;&#x6570;&#x5206;&#x7C7B;</h3>

<table>
<thead>
<tr>
<th><strong>&#x96C6;&#x5408;&#x540D;</strong></th>
<th><strong>&#x63CF;&#x8FF0;</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td><code>String</code></td>
<td>&#x5B57;&#x7B26;&#x4E32;&#x5904;&#x7406;&#x51FD;&#x6570;</td>
</tr>
<tr>
<td><code>Array</code></td>
<td>&#x6570;&#x7EC4;&#x51FD;&#x6570;&#x5141;&#x8BB8;&#x60A8;&#x8BBF;&#x95EE;&#x548C;&#x64CD;&#x4F5C;&#x6570;&#x7EC4;</td>
</tr>
<tr>
<td><code>MySQLi</code></td>
<td>&#x5141;&#x8BB8;&#x60A8;&#x8BBF;&#x95EE; MySQL &#x6570;&#x636E;&#x5E93;&#x670D;&#x52A1;&#x5668;</td>
</tr>
<tr>
<td><code>Date</code></td>
<td>&#x670D;&#x52A1;&#x5668;&#x4E0A;&#x83B7;&#x53D6;&#x65E5;&#x671F;&#x548C;&#x65F6;&#x95F4;</td>
</tr>
<tr>
<td><code>Filesystem</code></td>
<td>&#x5141;&#x8BB8;&#x60A8;&#x8BBF;&#x95EE;&#x548C;&#x64CD;&#x4F5C;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;</td>
</tr>
<tr>
<td><code>Mail</code></td>
<td>&#x6570;&#x5B66;&#x51FD;&#x6570;&#x80FD;&#x5904;&#x7406; integer &#x548C; float &#x8303;&#x56F4;&#x5185;&#x7684;&#x503C;</td>
</tr>
<tr>
<td><code>HTTP</code></td>
<td>&#x5141;&#x8BB8;&#x60A8;&#x5728;&#x5176;&#x4ED6;&#x8F93;&#x51FA;&#x88AB;&#x53D1;&#x9001;&#x4E4B;&#x524D;&#xFF0C;&#x5BF9;&#x7531; Web &#x670D;&#x52A1;&#x5668;&#x53D1;&#x9001;&#x5230;&#x6D4F;&#x89C8;&#x5668;&#x7684;&#x4FE1;&#x606F;&#x8FDB;&#x884C;&#x64CD;&#x4F5C;</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td><code>Calendar</code></td>
<td>&#x65E5;&#x5386;&#x6269;&#x5C55;&#x5305;&#x542B;&#x4E86;&#x7B80;&#x5316;&#x4E0D;&#x540C;&#x65E5;&#x5386;&#x683C;&#x5F0F;&#x95F4;&#x8F6C;&#x6362;&#x7684;&#x51FD;&#x6570;</td>
</tr>
<tr>
<td><code>Directory</code></td>
<td>&#x5141;&#x8BB8;&#x60A8;&#x83B7;&#x5F97;&#x5173;&#x4E8E;&#x76EE;&#x5F55;&#x53CA;&#x5176;&#x5185;&#x5BB9;&#x7684;&#x4FE1;&#x606F;</td>
</tr>
<tr>
<td><code>Error</code></td>
<td>&#x5141;&#x8BB8;&#x60A8;&#x5BF9;&#x9519;&#x8BEF;&#x8FDB;&#x884C;&#x5904;&#x7406;&#x548C;&#x8BB0;&#x5F55;</td>
</tr>
<tr>
<td><code>Filter</code></td>
<td>&#x8FDB;&#x884C;&#x9A8C;&#x8BC1;&#x548C;&#x8FC7;&#x6EE4;</td>
</tr>
<tr>
<td><code>FTP</code></td>
<td>&#x901A;&#x8FC7;&#x6587;&#x4EF6;&#x4F20;&#x8F93;&#x534F;&#x8BAE; (FTP) &#x63D0;&#x4F9B;&#x5BF9;&#x6587;&#x4EF6;&#x670D;&#x52A1;&#x5668;&#x7684;&#x5BA2;&#x6237;&#x7AEF;&#x8BBF;&#x95EE;</td>
</tr>
<tr>
<td><code>MySQL</code></td>
<td>&#x5141;&#x8BB8;&#x60A8;&#x8BBF;&#x95EE; MySQL &#x6570;&#x636E;&#x5E93;&#x670D;&#x52A1;&#x5668;</td>
</tr>
<tr>
<td><code>SimpleXML</code></td>
<td>&#x5141;&#x8BB8;&#x60A8;&#x628A; XML &#x8F6C;&#x6362;&#x4E3A;&#x5BF9;&#x8C61;</td>
</tr>
<tr>
<td><code>XML</code></td>
<td>&#x5141;&#x8BB8;&#x6211;&#x4EEC;&#x89E3;&#x6790; XML &#x6587;&#x6863;&#xFF0C;&#x4F46;&#x65E0;&#x6CD5;&#x5BF9;&#x5176;&#x8FDB;&#x884C;&#x9A8C;&#x8BC1;</td>
</tr>
<tr>
<td><code>Zip</code></td>
<td>&#x538B;&#x7F29;&#x6587;&#x4EF6;&#x51FD;&#x6570;&#x5141;&#x8BB8;&#x6211;&#x4EEC;&#x8BFB;&#x53D6;&#x538B;&#x7F29;&#x6587;&#x4EF6;</td>
</tr>
</tbody>
</table>
<hr>
<h1 class="mume-header" id="-%E8%87%AA%E5%AE%9A%E4%B9%89%E6%96%B9%E6%B3%95-%E8%87%AA%E5%AE%9A%E4%B9%89%E5%87%BD%E6%95%B0">:-: &#x81EA;&#x5B9A;&#x4E49;&#x65B9;&#x6CD5; (&#x81EA;&#x5B9A;&#x4E49;&#x51FD;&#x6570;)</h1>

<h3 class="mume-header" id="%E4%B8%80-%E6%96%B9%E6%B3%95%E4%BD%BF%E7%94%A8">&#x4E00;&#x3001;&#x65B9;&#x6CD5;&#x4F7F;&#x7528;</h3>

<h4 class="mume-header" id="1-%E6%96%B9%E6%B3%95%E5%A3%B0%E6%98%8E-function">1&#x3001;&#x65B9;&#x6CD5;&#x58F0;&#x660E; <code>function</code></h4>

<ul>
<li>&#x5173;&#x952E;&#x8BCD; + &#x65B9;&#x6CD5;&#x540D;</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token keyword">function</span> <span class="token function">a</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
    <span class="token keyword">echo</span> <span class="token single-quoted-string string">&apos;&#x6211;&#x662F;a&#x65B9;&#x6CD5;&apos;</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</pre><h4 class="mume-header" id="2-%E6%96%B9%E6%B3%95%E8%B0%83%E7%94%A8">2&#x3001;&#x65B9;&#x6CD5;&#x8C03;&#x7528;</h4>

<ul>
<li>&#x5728;&#x65B9;&#x6CD5;&#x5916;&#x90E8;&#x8C03;&#x7528;</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token function">a</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">function</span> <span class="token function">a</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
    <span class="token keyword">echo</span> <span class="token single-quoted-string string">&apos;&#x6211;&#x662F;a&#x65B9;&#x6CD5;&apos;</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token function">a</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><h4 class="mume-header" id="3-%E6%96%B9%E6%B3%95%E5%8F%82%E6%95%B0">3&#x3001;&#x65B9;&#x6CD5;&#x53C2;&#x6570;</h4>

<ul>
<li>&#x53C2;&#x6570;&#x6570;&#x91CF;&#x4E0D;&#x9650;&#x5236;</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token keyword">function</span> <span class="token function">a</span><span class="token punctuation">(</span><span class="token variable">$n1</span><span class="token punctuation">,</span><span class="token variable">$n2</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
    <span class="token keyword">echo</span> <span class="token variable">$n1</span> <span class="token operator">+</span> <span class="token variable">$n2</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token function">a</span><span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">,</span><span class="token number">10</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><ul>
<li>&#x65B9;&#x6CD5;&#x53C2;&#x6570;&#x53EF;&#x4EE5;&#x6709;&#x9ED8;&#x8BA4;&#x503C;&#xFF0C;&#x6709;&#x9ED8;&#x8BA4;&#x503C;&#x53EF;&#x4EE5;&#x4E0D;&#x4F20;&#x503C;</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token keyword">function</span> <span class="token function">a</span><span class="token punctuation">(</span><span class="token variable">$n1</span><span class="token punctuation">,</span><span class="token variable">$n2</span><span class="token operator">=</span><span class="token number">5</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
    <span class="token keyword">echo</span> <span class="token variable">$n1</span> <span class="token operator">+</span> <span class="token variable">$n2</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token function">a</span><span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre><h4 class="mume-header" id="4-%E6%96%B9%E6%B3%95%E8%BF%94%E5%9B%9E%E5%80%BC-return">4&#x3001;&#x65B9;&#x6CD5;&#x8FD4;&#x56DE;&#x503C; <code>return</code></h4>

<ul>
<li>&#x65B9;&#x6CD5;&#x5FC5;&#x987B;&#x4EE5;&#x8FD4;&#x56DE;&#x7684;&#x65B9;&#x5F0F;</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token keyword">function</span> <span class="token function">a</span><span class="token punctuation">(</span><span class="token variable">$n1</span><span class="token punctuation">,</span><span class="token variable">$n2</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
    <span class="token keyword">return</span> <span class="token variable">$n1</span> <span class="token operator">*</span> <span class="token variable">$n2</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">echo</span> <span class="token function">a</span><span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">,</span><span class="token number">10</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</pre>
      </div>
      
      
    
    
    
    
    
    
    
    
  
    </body></html>